'\" te
.\"  Copyright (c) 1999 Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH KVA_MATCH 3SECDB "Aug 13, 2018"
.SH NAME
kva_match \- look up a key in a key-value array
.SH SYNOPSIS
.LP
.nf
cc [ \fIflag\fR... ] \fIfile\fR... -lsecdb [ \fIlibrary\fR... ]
#include <secdb.h>

\fBchar *\fR\fBkva_match\fR(\fBkva_t *\fR\fIkva\fR, \fBchar *\fR\fIkey\fR);
.fi

.SH DESCRIPTION
.LP
The \fBkva_match()\fR function searches a \fBkva_t\fR structure, which is part
of the  \fBauthattr_t\fR, \fBexecattr_t\fR, \fBprofattr_t\fR, or
\fBuserattr_t\fR structures. The function takes two arguments: a pointer to a
key value array, and a key.  If the key is in the array, the function returns a
pointer to the first corresponding value that matches that key.  Otherwise, the
function returns \fINULL\fR.
.SH RETURN VALUES
.LP
Upon successful completion, the function returns a pointer to the value sought.
Otherwise, it returns \fINULL\fR.
.SH ATTRIBUTES
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
MT-Level	MT-Safe
.TE

.SH SEE ALSO
.LP
.BR getauthattr (3SECDB),
.BR getexecattr (3SECDB),
.BR getprofattr (3SECDB),
.BR getuserattr (3SECDB)
.SH NOTES
.LP
The \fBkva_match()\fR function returns a pointer to data that already exists in
the key-value array. It does not allocate its own memory for this pointer but
obtains it from the key-value array that is passed as its first argument.
